package vip.web3.api.form.user;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import vip.web3.common.dto.BaseForm;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * aut-horlilei
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class UpdatePwdForm extends BaseForm {

    private static final long serialVersionUID = 1L;

    /**
     * 1-登录密码，2-支付密码
     */
    @NotNull(message = "修改类型不能空")
    @Min(value = 1, message = "修改类型只能是1和2")
    @Max(value = 2, message = "修改类型只能是1和2")
    private Integer pwdType;

    @NotBlank(message = "原密码不能空")
    private String oldPassword;

    @NotBlank(message = "密码不能空")
    private String password;

    @NotBlank(message = "确认密码不能空")
    private String confirmPassword;


}
